package com.cfpl.project_common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * 管理员
 * @TableName admin
 */
@TableName(value ="admin")
@Data
public class Admin implements Serializable {
    /**
     * 管理员id
     */
    @TableId(type = IdType.AUTO)
    private Long adminId;

    /**
     * 管理员姓名
     */
    private String adminName;

    /**
     * 手机号
     */
    private String adminPhone;

    /**
     * 邮箱
     */
    private String adminEmail;

    /**
     * 密码
     */
    private String adminPassword;

    /**
     * 社会信用代码(所属公司)
     */
    private Long adminCompany;

    /**
     * 管理员头像
     */
    private String adminHeadpic;

    /**
     * 性别
     */
    private Integer adminGender;

    /**
     * 创建(入职)时间
     */
    private Date createTime;

    /**
     * 是否删除、停用
     */
    private boolean isDelete;

    /**
     * 所属角色
     */
    @TableField(exist = false)
    private List<Role> roleList;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", adminId=").append(adminId);
        sb.append(", adminName=").append(adminName);
        sb.append(", adminPhone=").append(adminPhone);
        sb.append(", adminEmail=").append(adminEmail);
        sb.append(", adminPassword=").append(adminPassword);
        sb.append(", adminCompany=").append(adminCompany);
        sb.append(", adminHeadpic=").append(adminHeadpic);
        sb.append(", adminGender=").append(adminGender);
        sb.append(", createTime=").append(createTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}